#ifndef DSPSIMULATOR_DSPCONTENT_H
#define DSPSIMULATOR_DSPCONTENT_H

#include <vector>
#include "simulator/type/type.h"

namespace dspsimulator {
    struct Content {
        u64 m_first_branch_offset{0};
        u64 m_start_address{0};
        u64 m_end_address{0};

        Content() = default;

        Content(const Content &) = default;

        Content(Content &&) = default;

        Content &operator=(const Content &) = default;

        Content &operator=(Content &&) = default;

        ~Content() = default;

        bool operator==(const Content &other) const {
            return m_first_branch_offset == other.m_first_branch_offset &&
                    m_start_address == other.m_start_address;
        }
    };

    struct HashContent {
        std::size_t operator()(const Content &content) const {
            return std::hash<u64>()(content.m_first_branch_offset) ^
                   std::hash<u64>()(content.m_start_address);
        }
    };
}

#endif //DSPSIMULATOR_DSPCONTENT_H
